import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router/index'
import store from "../../store/index"
import '@/assets/css/base.scss'
import '@/assets/css/elementStyle.scss'
const appMain = createApp(App)
import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
import { getLocale } from '@/utils/globalTools'
// 国际化
import { createI18n } from 'vue-i18n'
import { messages } from './locale/setupI18n'

// 时间格式化
import moment from 'moment'
appMain.config.globalProperties.$moment = moment

const i18n = createI18n({
  locale: getLocale(),
  messages,
})
appMain.use(ElementPlus, {
  i18n: i18n.global.t,
})
appMain.use(i18n)


appMain.use(store).use(router).mount('#app')
